home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef __MYUTILS__
- #include <myUtils.h>
- #endif
-
- #ifndef __CLIST__
- #include <CList.h>
- #endif
-
- #ifndef __MACTCPCOMMONTYPES__
- #include <MacTCPCommonTypes.h>
- #endif
- #ifndef __UDPPB__
- #include <UDPPB.h>
- #endif
-
- class InetD;
- class UDPListener;
-
- class PortItem : public CItem {
- public:
- udp_port fPort;
-
- StreamPtr fStream;
- ProcPtr fProc;
- Ptr fUsrPtr;
- PSN fPSN;
-
- InetD* fDaemon;
-
- PortItem();
- };
-
- class UPortList : public CList {
- public:
- PortItem* GetItem(StreamPtr stream);
- PortItem* GetItem(PSNPtr psn);
- };
-
- class UDPListener {
- public:
- UPortList fNoteeList;
-
- UPortList fWaitList; // waiting for data
- UPortList fLaunchList; // waiting for handler to launch
- UPortList fRestartList; // waiting for handler to quit
-
- InetD* fDaemon;
-
- UDPListener(InetD* daemon);
- ~UDPListener();
-
- Boolean Initialize();
-
- void DoNull();
-
- void NotifyMe(PSNPtr psn, StreamPtr stream, ProcPtr proc, Ptr usr);
- void UnNotify(PSNPtr psn);
-
- void ListenAgain(PSNPtr psn);
-
- void Release();
- void CloseDown(StreamPtr stream);
- void ListenOn(udp_port port);
- };
-
- extern "C" {
- pascal void UDPNotify( StreamPtr stream,
- unsigned short eventCode,
- Ptr usrData,
- struct ICMPReport* icmp);
- };
-
-